package com.example.fresh_fruit.util;

/**
 * @author :飞天の鱼
 * @date : 2022/8/18 8:52
 */

/**
 * 自定义异常,对返回值进行操作
 */
public class SystemException extends RuntimeException{
    private int code;
    private String msg;

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    public SystemException(ResultCodeEnum resultCodeEnum) {
        super(resultCodeEnum.getMessage());
        this.code = resultCodeEnum.getCode();
        this.msg = resultCodeEnum.getMessage();
    }

}
